Namespaces

Types in MathNet.Numerics.Statistics.Mcmc

Type RejectionSampler<T>

Namespace MathNet.Numerics.Statistics.Mcmc

Parent McmcSampler<T>

Rejection sampling produces samples from distribution P by sampling from a proposal distribution Q and accepting/rejecting based on the density of P and Q. The density of P and Q don't need to to be normalized, but we do need that for each x, P(x) < Q(x).

Constructors

Methods

Properties

Public Constructors

RejectionSampler<T>(Density<T> pdfP, Density<T> pdfQ, GlobalProposalSampler<T> proposal)

Constructs a new rejection sampler using the default Random random number generator.
Parameters
Density<T> pdfP

The density of the distribution we want to sample from.

Density<T> pdfQ

The density of the proposal distribution.

GlobalProposalSampler<T> proposal

A method that samples from the proposal distribution.

Public Methods

bool Equals(object obj)

int GetHashCode()

Type GetType()

T Sample()

Returns a sample from the distribution P.

T[] Sample(int n)

Returns a number of samples.
Parameters
int n

The number of samples we want.

Return
T[]

An array of samples.

string ToString()

Public Properties

double AcceptanceRate get;

Random RandomSource get; set;